//
//  JPhotoBrowser.h
//  JPhotoBrowser_Example
//
//  Created by 计海峰 on 2017/11/16.
//  Copyright © 2017年 jhfappkf@163.com. All rights reserved.
//

#import <UIKit/UIKit.h>

//版本号:v0.1 - 20171120 - 0.1.3

#import "JPhotoItem.h"  

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSUInteger, JPhotoBrowserInteractiveDismissalStyle) {
    JPhotoBrowserInteractiveDismissalStyleRotation,
    JPhotoBrowserInteractiveDismissalStyleScale,
    JPhotoBrowserInteractiveDismissalStyleSlide,
    JPhotoBrowserInteractiveDismissalStyleNone
};

typedef NS_ENUM(NSUInteger, JPhotoBrowserBackgroundStyle) {
    JPhotoBrowserBackgroundStyleBlurPhoto,
    JPhotoBrowserBackgroundStyleBlur,
    JPhotoBrowserBackgroundStyleBlack
};

typedef NS_ENUM(NSUInteger, JPhotoBrowserPageIndicatorStyle) {
    JPhotoBrowserPageIndicatorStyleDot,
    JPhotoBrowserPageIndicatorStyleText
};

typedef NS_ENUM(NSUInteger, JPhotoBrowserImageLoadingStyle) {
    JPhotoBrowserImageLoadingStyleIndeterminate,
    JPhotoBrowserImageLoadingStyleDeterminate
};

@protocol JPhotoBrowserDelegate, KSImageManager;
@interface JPhotoBrowser : UIViewController

@property (nonatomic, assign) JPhotoBrowserInteractiveDismissalStyle dismissalStyle;
@property (nonatomic, assign) JPhotoBrowserBackgroundStyle backgroundStyle;
@property (nonatomic, assign) JPhotoBrowserPageIndicatorStyle pageindicatorStyle;
@property (nonatomic, assign) JPhotoBrowserImageLoadingStyle loadingStyle;
@property (nonatomic, assign) BOOL bounces;
@property (nonatomic, weak) id<JPhotoBrowserDelegate> delegate;

+ (instancetype)browserWithPhotoItems:(NSArray<JPhotoItem *> *)photoItems selectedIndex:(NSUInteger)selectedIndex;
- (instancetype)initWithPhotoItems:(NSArray<JPhotoItem *> *)photoItems selectedIndex:(NSUInteger)selectedIndex;
- (void)showFromViewController:(UIViewController *)vc; 

@end

@protocol JPhotoBrowserDelegate <NSObject>

- (void)j_photoBrowser:(JPhotoBrowser *)browser didSelectItem:(JPhotoItem *)item atIndex:(NSUInteger)index;

@end

NS_ASSUME_NONNULL_END
